// 懒加载文件路径
const loadPlugin = {

	// radio、checkbox美化
	icheck: {
    	insertBefore: '#loadBefore',
        name: 'icheck',
        files: ['scripts/plugins/icheck/icheck.js']
    },

    // 中文日期
    locale: {
        insertBefore: '#loadBefore',
        name: 'locale_zh-cn',
        files: ['scripts/plugins/zh-cn/angular-locale_zh-cn.js']
    },

    // 日期格式化控件
    moment: {
        name: 'moment',
        files: ['scripts/plugins/moment/moment.js']
    },

    // 百度编辑器
    umeditor: {
        name: 'umeditor',
        files: ['scripts/plugins/umeditor/themes/default/css/umeditor.css','scripts/plugins/umeditor/umeditor.config.js','scripts/plugins/umeditor/umeditor.js']
    },

    // 表格控件
    dataTables: [
    	{
            files: ['styles/plugins/dataTables/dataTables.bootstrap.css']
        },
        {
        	insertBefore: '#loadBefore',
            files: ['scripts/plugins/dataTables/dataTables.bootstrap.js']
        }
	],

	//dropzone
	dropzone: {
		name: 'dropzone',
		files: ['styles/plugins/dropzone/dropzone.css']
	},

	// blink
	blink: {
		name: 'blink',
		files: ['scripts/plugins/common/jQuery.blink.js']
	},


	// jscolorui
	jscolorui: {
		name: 'jscolorui',
		files: ['scripts/plugins/jscolor/jscolor.min.js','scripts/plugins/jqui/jquery-ui-1.10.4.min.js','scripts/plugins/attrchange/attrchange.js']
	},

	// bootdropdown
	dropdown: {
		name: 'dropdown',
		files: ['scripts/plugins/dropdown/dropdown.js']
	},

	// grumble
	grumble: {
		name: 'grumble',
		files: ['scripts/plugins/grumble/jquery.grumble.min.js']
	},

	// qrcode
	qrcode: {
		name: 'qrcode',
		files: ['scripts/plugins/qrcode/jquery.qrcode.min.js']
	},

    chosen: {
        name: 'chosen',
        files: ['scripts/plugins/chosen/chosen.jquery.js']
    },

	// clipboard
	clipboard: {
		name: 'clipboard',
		files: ['scripts/plugins/clipboard/clipboard.min.js']
	},

	// peity
	peity: {
		insertBefore: '#loadBefore',
        name: 'angular-peity',
        files: ['scripts/plugins/peity/jquery.peity.min.js', 'scripts/plugins/peity/angular-peity.js']
    },

    // 滑动开关
    multiswitch: {
        name: 'multiswitch',
        files: ['scripts/plugins/multiswitch/multi-switch.min.css', 'scripts/plugins/multiswitch/multi-switch.js']
    },

    // flot
    flot: {
        serie: true,
        name: 'angular-flot',
        files: [ 'scripts/plugins/flot/jquery.flot.js', 'scripts/plugins/flot/jquery.flot.time.js', 'scripts/plugins/flot/jquery.flot.tooltip.min.js', 'scripts/plugins/flot/jquery.flot.spline.js', 'scripts/plugins/flot/jquery.flot.resize.js', 'scripts/plugins/flot/jquery.flot.pie.js', 'scripts/plugins/flot/curvedLines.js', 'scripts/plugins/flot/angular-flot.js', ]
    },

    // angles
    angles: {
        name: 'angles',
        files: ['scripts/plugins/chartJs/Chart.min.js', 'scripts/plugins/chartJs/angles.js']
    },

    // tabjss
    tabjs: {
        name: 'tabjs',
        files: ['scripts/plugins/tabjs/tab.js']
    },

    //jquery-ui
    jqueryui: {
        name: 'jqueryui',
        files: ['scripts/plugins/jqueryui/jquery-ui-1.10.4.min.js']
    },

    //metisMenu
    metismenu: {
        name: 'metismenu',
        files: ['scripts/plugins/metisMenu/jquery.metisMenu.js']
    },

    //slimscroll
    slimscroll: {
        name: 'slimscroll',
        files: ['scripts/plugins/slimscroll/jquery.slimscroll.min.js']
    },

    // imglazy
    imglazy: {
        insertBefore: '#loadBefore',
        name: 'imglazy',
        files: ['scripts/plugins/lazyload/jquery.lazyload.js', 'scripts/plugins/lazyload/angular.imglazy.js']
    },

    //mediaelementandplayer
    mediaelementandplayer: {
        name: 'mediaelementandplayer',
        files: ['scripts/plugins/mediaelement-and-player/mediaelement-and-player.js', 'scripts/plugins/mediaelement-and-player/mediaelementplayer.min.css']
    }
    

}

// 懒加载方法，接受一个数组参数
function loadPluginFn(array) {
    return ['$ocLazyLoad', function ($ocLazyLoad) {
        return $ocLazyLoad.load(array)
    }]
}

export { loadPlugin, loadPluginFn };